package randomNum
{
	import flash.events.AccelerometerEvent;
	import flash.sensors.Accelerometer;

	public class RandomNumManager
	{
		public function RandomNumManager()
		{
		}
		static private var _instance:RandomNumManager;
		static public function get instance():RandomNumManager{
			_instance=_instance||new RandomNumManager;
			return _instance;
		}
		private var _view:RandomNumScene;
		private var _myAcc:Accelerometer;
		private var _oldMoveX:Number;
		private var _oldMoveY:Number;
		private var _oldMoveZ:Number;
		public function start(view:RandomNumScene):void{
			_view=view;
			_build();
			_addEvent();
		}
		private function _build():void
		{
			_myAcc=new Accelerometer();
		}
		private function _addEvent():void
		{
			_myAcc.addEventListener(AccelerometerEvent.UPDATE, _onAccUpdate);
		}
		
		private function _onAccUpdate(e:AccelerometerEvent):void{
		    _view.setText(Config.andeoidId);
		}
	}
}